<?php
/**
* 订单模块数据配置后台 Controller
*
* 订单模块数据配置后台 Controller的注意及说明
* 以下use模块请不要互相伤害
*
* @author    xiecz <xiecz@yunys.com.cn>
* @copyright 2016 QuanZhouYunYiShang Inc.
*/

namespace App\Http\Controllers\Backstage;

use Illuminate\Routing\Controller as BaseController;
use Response, Request;
use App\Services\Order\OrderConfigBackstsge;

class OrderConfigController extends BaseController{

    function __construct(OrderConfigBackstsge $config){
        $this->config = $config;
    }

    /**
     * 订单配置参数列表
     * @return $this
     */
    function orderConfigList(){
        $input  = Request::all();
        $result = $this->config->order_config_list($input);
        return view('backstage.order.order-config-list')->with('result',$result);
    }

    /**
     * 修改订单配置
     * @return mixed
     */
    function updateOrderConfig(){
        $input  = Request::all();
        $result = $this->config->update_order_config($input);
        return response()->json($result);
    }
}
